package com.vanvalt.payhui.modules.pay.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.sys.dao.UserDao;
import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * @author Xiaoyang
 *
 */
@Service
@Transactional(readOnly = true)
public class UserService extends CrudService<UserDao, User> {

	@Autowired
	public UserDao userDao;
	
	@Transactional(readOnly = false)
	public void updateUserLoginInfo(User user) {
		
		user.setLoginDate(new Date());
		userDao.updateLoginInfo(user);
	}
	
	@Transactional(readOnly = false)
	public User findUserByTid(User user){
		
		return userDao.findUserByTid(user);
	}
}
